<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="stylesheet" href="../css_js/swiper-bundle.min.css" />
        <script src="../css_js/swiper-bundle.min.js"></script>
        <title>Document</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            .swiper {
                width: 375px;
                height: 200px;
                background-color: rgb(211, 209, 209);
            }
            .swiper-slide img {
                width: 100%;
                height: 100%;
            }
        </style>
    </head>
    <body>
        <div class="swiper">
            <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <img src="https://markdown-1253389072.cos.ap-nanjing.myqcloud.com/202112221722044.jpeg" alt="" />
                </div>
                <div class="swiper-slide">
                    <img src="https://markdown-1253389072.cos.ap-nanjing.myqcloud.com/202112221722908.jpeg" alt="" />
                </div>
                <div class="swiper-slide">
                    <img src="https://markdown-1253389072.cos.ap-nanjing.myqcloud.com/202112221722908.jpeg" alt="" />
                </div>
            </div>
            <!-- 如果需要分页器 -->
            <div class="swiper-pagination"></div>
        </div>
        <script>
            var mySwiper = new Swiper(".swiper", {
                loop: true, //图片循环头尾相连
                speed: 500, //图片切换滑动的速度，默认300ms，非图片切换的间隔时间，速度可自定义
                autoplay: {
                    delay: 2000, //图片每2秒切换一张，可调整大小
                    disableOnInteraction: false,//人为操作后继续播放
                },
                // 如果需要分页器
                pagination: {
                    el: ".swiper-pagination",
                },
            });
        </script>
    </body>
</html>
